<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath %>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>郎坤物联网物流管理系统-仓库信息</title>
<meta name="kewywords" content="郎坤物联网物流管理系统"/>
<meta name="description" content="郎坤物联网物流管理系统"/>
<link href="css/style.css" type="text/css" rel="stylesheet"/>
<script language="javascript" type="text/javascript" src="js/js.js"></script>
<script type="text/javascript" src="js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="js/LocalList.js"></script>	
<script type="text/javascript">
	
	$(document).ready(function(){
		if($("#errorMessage").val() == "norecord"){
			alert("查无此条记录，请重新输入订单号码");
		}
	});
	function queryCheck(){
		var pattern = new RegExp(/^[0-9-+]+$/);//^表示开始 $表示结束 右方括号（])后跟+号，意味着这个模式可以重复一次或多次
        var orderid = $("#orderId").val();
        if($.trim(orderid).length != 12){
        	alert("请输入12位数字订单号码");
        	return;
        }else if(!pattern.test(orderid)){
        	alert("您输入的号码中含有非数字字符，请重新输入");
        	return;
        }
        $("#queryOrder").submit();
	}
</script>
</head>
<body>
<%@include file="top.jsp" %>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="187" height="37" bgcolor="#e0e0e0" class="brt bbt"><div class="topleft fl">系统菜单栏</div></td>
    <td bgcolor="#e7e7e7" class=" bbt"><div class="topleft fl">您现在的位置：<a href="#">首页</a>&nbsp;>&nbsp;<span>出库</span></div></td>
  </tr>
  <tr>
    <td width="187" height="100%" valign="top" bgcolor="#FFFFFF" class="brt">
    	<div class="left_bk"> 
           <div class="menu2">
         <%@include file="repertory_left.jsp" %>
        </div>
        </div></td>
    <td align="left" valign="top" bgcolor="#FFFFFF" > 
    <div class="content">
	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="38" style="background:url(images/zz_tit.jpg) left top repeat-x;">
          <div class="tt_back fl">出库</div>
          <div class="fr"><img src="images/tit_right.jpg" alt="" width="103" height="38" /></div>
          </td>
        </tr>
        <tr>
          <td class="borders btn">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
		    <td bgcolor="#fffeee" height="41" style="border-bottom:#fee7bd solid 1px;" align="center">
		    <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
		      <tr>
		        <td>
		        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#e3e3e3">
		          <tr class="captitle">
		            <td height="31" colspan="6"  valign="middle" style="padding-left: 20px;font-weight: bold;">
						当前仓库
		            </td>
		            </tr>
		          <tr height="26" bgcolor="#efefef" class="captit">
		          	<td width="10%" height="26" align="center" valign="middle" bgcolor="#FFFFFF">仓库编号</td>
		            <td width="15%" height="26" align="center" valign="middle" bgcolor="#FFFFFF">仓库名称</td>
		            <td width="10%" height="26" align="center" valign="middle" bgcolor="#FFFFFF">仓库类型</td>
		            <td width="35%" height="26" align="center" valign="middle" bgcolor="#FFFFFF">仓库所在位置</td>
		            <td width="10%" height="26" align="center" valign="middle" bgcolor="#FFFFFF">仓库管理员</td>
		            <td width="20%" height="26" align="center" valign="middle" bgcolor="#FFFFFF">备注信息</td>
		          </tr>
		          <s:iterator value="warehouseList" id="item">
		          	<tr height="26" bgcolor="#efefef">
		          		<td align="center" valign="middle"><s:property value="#item.id"/></td>
		          		<td align="center" valign="middle"><s:property value="#item.warehouse"/></td>
		          		<td align="center" valign="middle"><s:property value="#item.waretype"/></td>
		          		<td align="center" valign="middle"><s:property value="#item.whlocation"/></td>
		          		<td align="center" valign="middle"><s:property value="#item.whkeeper"/></td>
		          		<td align="center" valign="middle"><s:property value="#item.remark"/></td>
		          	</tr>
		          </s:iterator>
		          <tr class="captitle">
		            <td height="31" colspan="10" valign="middle" style="padding-left: 20px;font-weight: bold;">
		                   出库订单
		            </td>
		            </tr>
		        </table>
		        </td>
		      </tr>
		    </table>		   
		</td>
		  </tr>
		  <tr>
		    <td align="center">
		    <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
		    	<tr>
				    <td height="41" bgcolor="#fffeee" style="border-bottom:#fee7bd solid 1px;padding-left: 20px;">
				    <form action="repertory/queryStockOutOrder.action" id="queryOrder" method="post">	
				    	<s:hidden name="errorMessage" id="errorMessage"/>	
					    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="left">
						    <tr>
						    <td width="10%" align="right">订单号：</td>
						    <td width="20%">
						    	<input type="text" id="orderId" name="orderid" 						    		
						    		style="width: 200px;" class="input_are w122" />
						    </td>
						    <td width="70%" style="padding-left: 20px;" align="left">
						    	<input type="button" class="buttons2" style="cursor: pointer;" value="查询" 
						    		placeholder = "12位数字订单号吗" onclick="queryCheck()"/>
						    </td>
						  	</tr>
					  	</table>
					</form>
					</td>
			  	</tr>
		      	<tr>
		        <td colspan="2">
		        <div style="height:350px">
		        <s:if test="order.id != null">
		        <table id="stockOutOrderInfo" width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#e3e3e3">
		          <!-- 
		          <thead><tr style="height: 40px;"><th width="90%" colspan="3" align="center">订单信息</th><th width="10%"></th></tr></thead>
		           -->
		          <tr style="height: 30px;">
					<td align="right" width="10%">订单号：</td>
					<td width="30%" align="left" valign="middle">
						<input type="text" class="input_are" id="orderid" name="order.id" value="${order.id}" readonly />
					</td>
				    <td align="right" width="10%">寄件日期：</td>
					<td width="50%" align="left" valign="middle">				  				
						<input type="text" id="senddate" name="order.senddate" value="<s:date name="order.senddate" format="yyyy-MM-dd" />" 
							class="input_are" readonly/>
					</td>
				</tr>
				<tr style="height: 30px;">
					<td align="right" width="10%">寄件人姓名：</td>
					<td width="30%"  align="left" valign="middle">
						<input type="text" id="sender" class="input_are" name="order.sender" value="${order.sender}" readonly/></td>
				    <td align="right" width="10%">收件人姓名：</td>
					<td width="50%" align="left" valign="middle">
						<input type="text" id="recipient" class="input_are" name="order.recipient" value="${order.recipient}" readonly/></td>
				</tr>
				<tr style="height: 30px;">
					<td align="right" width="10%">寄件人公司：</td>
					<td width="30%" align="left" valign="middle">
						<input type="text" id="senderfirm" class="input_are" name="order.senderfirm" value="${order.senderfirm}" readonly/></td>
				    <td align="right" width="10%">收件人公司：</td>
					<td width="50%" align="left" valign="middle">
						<input type="text"  id="recipientfirm" class="input_are" name="order.recipientfirm" value="${order.recipientfirm}" readonly/></td>
				</tr>
				<tr style="height: 30px;">
					<td align="right" width="10%">寄件人电话：</td>
					<td width="30%" align="left" valign="middle">
						<input type="text" id="sendertel" class="input_are" name="order.sendertel" value="${order.sendertel}" readonly/></td>
				    <td align="right" width="10%">收件人电话：</td>
					<td width="50%" align="left" valign="middle">
						<input type="text" id="recipienttel" class="input_are" name="order.recipienttel" value="${order.recipienttel}" readonly/></td>
				</tr>
				<tr style="height: 30px;">
					<td align="right" width="10%">寄件人地址：</td>
					<td width="30%" align="left" valign="middle" >												  
						<input type="text" style="width:350px" id="senderaddr" class="input_are" name="order.senderaddr" 
							value="${order.senderaddr}" readonly/>						
					</td>				
					<td align="right" width="10%">收件人地址：</td>
					<td width="50%" align="left" valign="middle" >
						<input type="text" style="width:350px" id="recipientaddr" class="input_are" name="order.recipientaddr" value="${order.recipientaddr}" 
							readonly/></td>
				</tr>
				<tr style="height: 30px;">
					<td align="right" width="10%">原寄地：</td>
					<td width="30%" align="left" valign="middle">
						<input type="text" id="origin" class="input_are" name="order.origin" value="${order.origin}" readonly/></td>
				    <td align="right" width="10%">目的地：</td>
					<td width="50%" align="left" valign="middle">
						<input type="text" id="destination" class="input_are" name="order.destination" value="${order.destination}" readonly/></td>
				</tr>
				<tr style="height: 30px">
					<td align="right" width="10%">规格：</td>
					<td colspan="3" align="left" valign="middle" width="90%">
						数量
						<input type="text" style="width: 60px;" id="quantity" class="input_are" name="order.quantity" value="${order.quantity}" />&nbsp;&nbsp;&nbsp;&nbsp;
						重量
						<input type="text" style="width: 60px;" id="weight" class="input_are" name="order.weight" value="${order.weight}" />kg&nbsp;&nbsp;&nbsp;&nbsp;
						长
						<input type="text" style="width: 60px;" id="length" class="input_are" name="order.length" value="${order.length}" />m&nbsp;&nbsp;&nbsp;&nbsp;
						宽
						<input type="text" style="width: 60px;" id="width" class="input_are" name="order.width" value="${order.width}" />m&nbsp;&nbsp;&nbsp;&nbsp;
						高
						<input type="text" style="width: 60px;" id="height" class="input_are" name="order.height" value="${order.height}" />m&nbsp;&nbsp;
					</td>
				</tr>
				
				<tr style="height: 30px;">
					<td align="right" width="10%">费用：</td>
					<td width="30%" align="left" valign="middle">				  				
						<input type="text" id="cost" class="input_are"  name="order.cost" value="${order.cost}"/>
					</td>
					<td align="right" width="10%">收件员：</td>
					<td width="50%" align="left" valign="middle">				  				
						<input type="text" id="receiver" class="input_are"  name="order.receiver" value="${order.receiver}"/>
					</td>			  			
				</tr>
				<tr style="height: 30px;">											
					<td align="right" width="10%">备注：</td>
					<td width="90%" align="left" valign="middle" colspan="3">				  				
						<input type="text" style="width:350px" id="remark" class="input_are"  name="order.remark" value="${order.remark}"/>
					</td>			  			
				</tr>
		        <tr style="height: 30px;">	           
		            <td align="center" valign="middle" bgcolor="#FFFFFF" class="wordblue" colspan="2">
		            	<input type="button" class="buttons2" style="cursor: pointer;" value="出  库" 
						    onclick="location.href='repertory/stockout.action?orderid=${order.id}'"/>
		            </td>
		            <td align="left" valign="middle" bgcolor="#FFFFFF" class="wordblue" colspan="2">
		            	<input type="button" class="buttons2" style="cursor: pointer;" value="取 消" 
						    onclick="location.href='repertory/cancelStockOut.action'"/></td>
		        </tr>		          
		        </table>
		        </s:if>
		        <s:else></s:else>
		        </div>
		        </td>
		      </tr>		     
		    </table></td>
		  </tr>
		</table>
		</td>
        </tr>
      </table>
    </div></td>
  </tr>
</table>
<div class="bottom">版权所有：安徽朗坤物联网</div>
</body>
</html>